how to find range of inverse function